package org.tea.inventory.model.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.tea.inventory.base.validation.groups.CreateGroup;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import java.util.Date;
import java.util.List;

/**
 * @author hanzy
 * @description 福利
 * @date 2023年04月06日 15:10
 */
@Data
public class WelfareDto {

    /**
     * 0-福利 1-活动
     */
    @ApiModelProperty(value = "福利id")
    private Long welfareId;

    /**
     * 0-福利 1-活动
     */
    @ApiModelProperty(value = "0-福利 1-活动")
    private Integer type;

    /**
     * 图片
     */
    @ApiModelProperty(value = "图片")
    @NotBlank(message = "福利图片不能为空", groups = {CreateGroup.class})
    private String imgUrl;

    /**
     * 标题
     */
    @ApiModelProperty(value = "标题")
    @NotBlank(message = "标题不能为空", groups = {CreateGroup.class})
    private String title;


    private List<String> participants;


    /**
     * 开始时间
     */
    @ApiModelProperty(value = "开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date startTime;

    /**
     * 结束时间
     */
    @ApiModelProperty(value = "结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date endTime;

    /**
     * 内容
     */
    @ApiModelProperty(value = "内容")
    @NotBlank(message = "福利内容不能为空", groups = {CreateGroup.class})
    private String content;


}
